#include "item.h"
#include <QPixmap>
#include <QDebug>

item::item()
{
    this->setPixmap(QPixmap(":/bg/pic/gaoshu.jpg"));
}

void item::setPic(QString path)
{
    this->setPixmap(QPixmap(path));
}

void item::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
    if(this->isMouse()){
        qDebug()<<"烂";
    }
else{
        qDebug()<<"中了";
    }
}

void item::setMouse(bool mouse)
{
    this->mouse = mouse;
}

bool item::isMouse()
{
    return this->mouse;
}
